import React, { Component } from 'react'
import { Route,Redirect } from 'react-router'

export default class PrivateRoute extends Component {
    render() {
        let info = sessionStorage.getItem("info")
        return (
            <>
            {info?<Route {...this.props}></Route>:<Redirect to="login" ></Redirect>}
            </>
        )
    }
}
